1. Field of the Invention
The present invention relates to a filter device, and more specifically to a filter device using a noise reduction (NR) filter. The present invention also relates to a filtering method and a filtering program product using an NR filter.
2. Description of the Prior Art
Some electronic devices, including DVD recorders that handle a coded image signal, use a noise reduction (NR) filter for reducing block noise or mosquito noise so as to improve image quality. An NR filter that is used in a circuit after decoding a coded image signal is particularly called a postfilter.
(Filter Device 400)
FIG. 21 shows a block diagram of a filter device 400 for performing a noise reduction (NR) process.
The filter device 400 includes a postfilter portion 300 that performs a horizontal and a vertical NR process on a decoded image signal 310 so as to produce an NR processed signal 312, and a vertical resolution conversion portion 303 that performs a vertical resolution conversion of the NR processed signal 312 so as to produce a display image signal 313.
(Postfilter Portion 300)
The postfilter portion 300 includes a horizontal NR process portion 301 that receives the decoded image signal 310 and produces a horizontal NR processed signal 311, and a vertical NR process portion 302 that receives the horizontal NR processed signal 311 and produces the NR processed signal 312.
The horizontal NR process portion 301 that performs the horizontal NR process on the decoded image signal 310 includes a condition decision portion 304 and a horizontal NR process execution portion 305. The condition decision portion 304 decides the application conditions as to whether or not to apply the horizontal NR filter to the decoded image signal 310 in accordance with a previously set threshold level 315. The horizontal NR process execution portion 305 performs the horizontal NR process on the decoded image signal 310 in accordance with the decoded image signal 310 and the result of the decision 318 by the condition decision portion 304 so as to produce the horizontal NR processed signal 311.
The vertical NR process portion 302 that performs the vertical NR process on the horizontal NR processed signal 311 includes a condition decision portion 306 and a vertical NR process execution portion 307. The condition decision portion 306 decides whether or not to apply the vertical NR filter to the horizontal NR processed signal 311 in accordance with a previously set threshold level 316. The vertical NR process execution portion 307 performs the vertical NR process on the horizontal NR processed signal 311 in accordance with the horizontal NR processed signal 311 and the result of the decision 319 by the condition decision portion 306 so as to produce the NR processed signal 312.
FIG. 22 shows a block diagram for explaining the structure of a vertical NR filter portion that is used in the vertical NR process portion 302. The vertical NR process portion 302 includes six vertical NR filter portions 321-326, each of which has the number of filter taps [3]. The vertical NR filter portions 321-326 are supplied with the horizontal NR processed signal 311. More specifically, pixel values Y(y−3) to Y(y+4) of eight lines at the same horizontal position of the horizontal NR processed signal 311 enter the vertical NR filter portions 321-326 in groups of three lines.
Each of the vertical NR filter portions 321-326 decides whether or not the vertical NR filter should be used for the horizontal NR processed signal 311 in accordance with the input pixel values Y(y−3) to Y(y+4) and the set threshold level 316 so as to produce the NR processed signal 312. The NR processed signal 312 is produced as pixel values Y′(y−2) to Y′(y+3) by the vertical NR filter portions 321-326. Namely, each of the vertical NR filter portions 321-326 works as the condition decision portion 306 and the vertical NR process execution portion 307.
The decision whether or not the filter is to be applied in each of the vertical NR filter portions 321-326 will be described with reference to FIG. 23. For example, the vertical NR filter portion 323 includes a vertical NR filter having the number of filter taps [3] for using three pixels “y−1”, “y” and “y+1” for a filter application pixel “y” having a pixel value Y(y). Whether the vertical NR filter should be used or not for the filter application pixel “y” in the vertical NR filter portion 323 is decided by using the filter application condition F1. If a value of the filter application condition F1 is [1], a filter having filter factor [1,2,1] is applied to pixels “y−1”, “y” and “y+1” so as to produce a pixel value Y′ (y). Note that CMP(y) is a comparison function defined by the equation F3 in the filter application condition F1. Furthermore, TH in the equation F3 means the threshold level 316.
The basic operation is similar with respect to other vertical NR filter portions 321, 322 and 324-326. In addition, the basic operation is also similar with respect to the horizontal NR filter portion in the horizontal NR process portion 301.
(Vertical Resolution Conversion Portion 303)
The NR processed signal 312 produced by the postfilter portion 300 (see FIG. 21) is received by the vertical resolution conversion portion 303. The received NR processed signal 312 is processed by the vertical resolution conversion filter for vertical resolution conversion and the display image signal 313 is produced. The vertical resolution conversion portion 303 includes a plurality of vertical resolution conversion filters that are applied in accordance with a conversion ratio for the vertical resolution. The plural vertical resolution conversion filters are selected in accordance with a resolution conversion filter selection signal 317.
With reference to FIG. 24, three resolution conversion filters of the vertical resolution conversion portion 303 will be described. The vertical resolution conversion portion 303 selects a resolution conversion filter in accordance with three values [0], [1] and [2] designated by the resolution conversion filter selection signal 317. If the value [0] is designated for example, the resolution conversion of the NR processed signal 312 is not performed, and a pixel value Y″(y) for Y″(y)=Y′(y) is generated as the display image signal 313. If the value [1] is designated, a pixel value Y″(y) that is derived from six pixel values Y′(y−2) to Y′(y+3) of the NR processed signal 312 are produced. Here, the value [1] is designated for example, when the conversion of the vertical resolution is not a conversion with a simple conversion ratio such as an integer or an inverse number of an integer. If the value [2] is designated, a pixel value Y″(y) derived from four pixel values Y′(y−1) to Y′(y+2) of the NR processed signal 312 is generated. Here, the value [2] is designated for example, when the conversion of the vertical resolution is a conversion with a simple conversion ratio such as an integer or an inverse number of an integer.
(Block NR Filter)
On the other hand, there is a technique known in which one of a plurality filters are switched and used for the purpose of improving the noise reduction effect, especially for the purpose of reducing block noise (see ISO/IEC, 14496-2: 2001(E), “Information Technology—Coding of Audio-Visual Objects—Part 2: Visual”, Second Edition, Dec. 1, 2001, pp. 448-450, for example).
With reference to FIG. 25, a deblock filter for reducing block noise that is disclosed in the above-mentioned document will be described. The deblock filter disclosed in the above-mentioned document calculates filtered pixel values Y′(k+1) to Y′(k+8) for eight pixels “k+1” to “k+8” (whose pixel values are Y(k+1)−Y(k+8)) including block boundaries of 8×8 pixels of an image block (for example, a coded block) that is a unit of process of an image signal. More specifically, differences between neighboring pixels are calculated for the pixels “k+1” to “k+8”, so as to switch the filter by condition decision using the difference between neighboring pixels. Here, the condition decision is performed in accordance with the equation F5. Note that φ(γ) is a comparison function defined by the equation F6 in the equation F5. Namely, it is decided whether an absolute value of the difference between neighboring pixels is smaller than or equal to the threshold level THR1 in the equation F6.
If the value eq_cnt of the equation F5 is more than or equal to threshold level THR2 and the equation F10 has a true value, the pixel values Y′(k+1) to Y′(k+8) after the filtering become values calculated by the equation F11. Here, Ymax and Ymin in the equation F10 are the maximum value and the minimum value of the pixel values Y(k+1) to Y(k+8), respectively. In addition, QP is a digitization parameter. Furthermore, p(k, i+j) and bj in the equation F11 are defined by the equations F12 and F13. Here, in the equation F13, “//” represents a division operation in which the fractional portion is rounded. Note that “/” in the equation represents a division operation in which the fractional portion is dropped off(similar hereinafter).
On the other hand, if a value eq_cnt of the equation F5 is less than the threshold level THR2, the pixel values Y′(k+1) to Y′(k+8) after the filtering become values calculated by the equation F15. Here, “d” in the equation F15 becomes a value calculated by the equation F16. In addition, a3,0′ in the equation F16 has a value decided in accordance with the equation F17 and the equation F18, while CLIP( ) is a function defined by the equation F19.
Concerning the above-described filter device, it is desirable to reduce hardware costs and to reduce the process load of the filtering process.
In particular, it is desirable to reduce hardware costs when performing the vertical NR process with hardware. When using a plurality of NR filters that are switched in order to obtain a sufficient noise reduction effect, it is desirable to simplify the hardware structure or to simplify the processes by means of software.